import { useCallback, useEffect, useRef, useState } from 'react'
import logo from './logo.svg'
import './App.css'

function App() {
  const [count, setCount] = useState(0)

  return (
    <div className="App">
      <Example />
    </div>
  )
}

function Example() {
  const [count, setCount] = useState(0);
  
  useEffect(() => {
    setInterval(() => {setCount(count + 1)},1000);
  },[])
  return (
    <div>
      <p>You clicked {count} times</p>
    </div>
  );
}

export default App
